package ssau.knyazev.db;

public class QueryUtilities {

	
	public static void main(String[] args){
		
		String str = "   s,hla sob aka po ss rojalu ";
		int countWords = 0;
		for (int i = 1; i < str.length(); i++){
			if (str.charAt(i) != ' ' && str.charAt(i-1) == ' '){
				countWords++;
			}
		}
		if (str.charAt(0) != ' '){
			countWords++;
		}
		System.out.println(countWords);
		
	}
	
}
